package cn.wjj.basic.util;

import lombok.Data;

@Data
public class AjaxResult {

    private Boolean success = true;
    private String message = "操作成功";

    /**
     * 内部提供 创建自己的静态方法
     */

    public static AjaxResult me(){
        return new AjaxResult();
    }

    /**
     * 链式编程
     */

    public AjaxResult setSuccess(Boolean success){
        this.success = success;
        return this;
    }

    /**
     * 链式编程
     */
    public AjaxResult setMessage(String message){
        this.message = message;
        return this;
    }
}
